let person: { name: string, age?: number, sex?: "男" | "女" } = { name: '张三', age: 14, sex: "男" }

interface Person {
    name: string
    age?: number
    sex?: "男" | "女"
}
let pp: Person = { name: '', age: 15, sex: "男" }

type TPerson = { name: string, age?: number, sex?: "男" | "女" }

let ppp: TPerson = { name: '', age: 15, sex: "男"  }

// es6的解构赋值
let {  age, sex } = ppp // 等同于

// let name = ppp.name
// let age = ppp.age
// let sex = ppp.sex

let b = { a: 1, b: 2, c: 3, d: 4, e: 5, f: { ff: 1 }  } // b对象

// let c = b  // c和b是公用一个地址一个对象
let c = { ...b } // 完成b的内容到a的内容- 浅拷贝(只拷贝第一层) - 深拷贝(不论你有多少层 全部拷贝)